<template>
  <div class="layout-page">
    <router-view />

<van-tabbar route z-index="0">
   <van-tabbar-item to="/article" icon="wap-home-o">首页</van-tabbar-item>
  <van-tabbar-item to="/collect" icon="search">找房</van-tabbar-item>
  <van-tabbar-item to="/like" icon="notes-o">资讯</van-tabbar-item>
  <van-tabbar-item :to="pathUser" icon="user-o">我的</van-tabbar-item>
</van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'layout-page',
  data () {
    return {
      pathUser: ''
    }
  },
  created () {
    localStorage.getItem('uname') ? this.pathUser = '/users' : this.pathUser = '/user'
  }

}
</script>

<style lang="less" scoped>

</style>
